<?php

namespace App\Api\Controllers;

use App\Api\Transformers\ClubInfoTransformer;
use App\Api\Transformers\ClubLIstTransformer;
use App\Club;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class ClubController extends BaseController
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        //
        $clubs = Club::all();
        return $this->response->collection($clubs,new ClubLIstTransformer());
    }
    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        //
        $club = Club::find($id);
        return $this->response->item($club,new ClubInfoTransformer());
    }

}
